package com.itheima.oop.d5_javabean;

/**
 * 操作数据
 * 操作类
 */
public class StudentOperator {
    private Student student;

    //利用操作类的无参构造器
    //把实体类传过来
    public StudentOperator(Student student) {
        this.student = student;
    }

    //定义一个方法 查看学生是否及格
    public void printPass(){
        if (student.getScore() >= 60){
            System.out.println(student.getName() +
                    "学生成绩及格");
        }else{
            System.out.println(student.getName() +
                    "学生成绩未及格");
        }
    }
}
